<template>
  <div class="render">
    <ul>
      <li v-for="(item, index) in renderList" :key="index">
        <div class="liTitle">
          <p class="liTitle_left">{{ item.title }}</p>
          <p class="liTitle_right">更多 ></p>
        </div>
        <div class="liTopic">
          <span class="topicWell"> # </span>
          <span class="topicTitle"> {{ item.list1 }}</span>
          <span class="topicDiscussion">{{ item.discuss1 }}</span>
        </div>
        <!-- 第二条 -->
        <div class="liTopic">
          <span class="topicWell"> # </span>
          <span class="topicTitle"> {{ item.list2 }}</span>
          <span class="topicDiscussion">{{ item.discuss2 }}</span>
        </div>
        <!-- 第三条 -->
        <div class="liTopic">
          <span class="topicWell"> # </span>
          <span class="topicTitle"> {{ item.list3 }}</span>
          <span class="topicDiscussion">{{ item.discuss3 }}</span>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
import { getChatlistApi } from "@/utils/api";
export default {
  data() {
    return {
      renderList: [],
    };
  },

  components: {},

  computed: {},

  // 进来就要请求
  mounted() {
    this.getData();
  },

  methods: {
    async getData() {
      const res = await getChatlistApi();
      // console.log(res);
      if (res.status === 0) {
        this.renderList = res.result;
      }
    },
  },
};
</script>

<style lang="less" scoped>
.render {
  width: 100%;
  ul {
    width: 100%;
    li {
      width: 693px;
      height: 351px;
      margin: auto;
      border-bottom: 2px solid #f1f1f1;
      overflow: hidden;
    }
  }
}
// 标题，更多
.liTitle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 55px;
  margin-bottom: 20px;
  .liTitle_left {
    font-size: 34px;
    font-weight: 900;
  }
  .liTitle_right {
    font-size: 24px;
    color: #bebebe;
  }
}
// 话题
.liTopic {
  height: 80px;
  display: flex;
  align-items: center;
  .topicWell {
    font-size: 30px;
    font-weight: bold;
    color: #78cccd;
    padding-right: 10px;
  }
  .topicTitle {
    font-size: 30px;
    font-weight: bold;
    color: #010101;
    padding-right: 15px;
  }
  .topicDiscussion {
    font-size: 20px;
    font-weight: bold;
    color: #afafaf;
  }
}
</style>
